<template>
  <div id='signup'>
    <h1>登录</h1>
    <v-text-field label="用户名"></v-text-field>
    <v-text-field label="密码" type="password"></v-text-field>
    <v-btn color="green" dark class="mb-2" @click="login">登录</v-btn>
    <v-btn @click="regist">注册</v-btn>
  </div>
</template>

<style scoped>
#signup{
  margin:0;
	position: fixed;
	top: calc(50% - 100px);
	left: calc(50% - 100px);
}

</style>
<script>
export default {
  methods: {
    login(){
        this.$api.testcase.getTestcase().then((result) => {
          this.desserts = result.data.msg.data
          console.log("获取用例列表接口", result.data.msg.data)
        }).catch((err) => {
          console.log("获取测试用例接口异常", err)
        });
      this.$router.push("/testcase")
      console.log('==>登录按钮被点击')
    },
    regist(){
      this.$router.push("/regist")//+ localStorage.getItem("Regist"));  //传参
      console.log('==>注册按钮被点击')
    }
  }

}
</script>